<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11.14.JS对象-内置对象-数组转换字符串</title>
    <script>
        // 连接数组
        // 1.一个数组里面数组元素连接
        var arr = ['hello', 'web'];
        console.log(''.concat(...arr));

        // 2.两个或多个数组元素连接
        var arr1 = '1';
        console.log(arr1.concat('2', '3'));

        // 3.两个或多个数组连接 生成新数组
        var arr2 = [1, 2];
        var arr3 = [3, 4];
        console.log(arr2.concat(arr3, [5]));
    </script>
</head>

<body>

</body>

</html>